#!/usr/bin/python
# -*- coding: utf-8 -*-

from selenium import webdriver
import time

spider_url = "https://news.qq.com/"

browser = webdriver.Chrome()
browser.set_page_load_timeout(30)
browser.get(spider_url)

#page_info = browser.find_element_by_css_selector('body > div.wrap > div.pagem.product_list_pager > div')
# print(page_info.text)

#samples = browser.find_all('li',attrs={'class':'item cf'})
#print(samples[0].string.encode('utf8'))

samples = browser.find_elements_by_css_selector("li.item.cf")
print(len(samples))

for sample in samples:
    print(sample.text)

